package br.com.fidalgotecnologia.layar.entity;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(schema="poi", name="transform")
@SequenceGenerator(sequenceName="poi.transform_id_seq" , name="transform_seq")
public class Transform implements Serializable{
	private Long id;
	private Rotation rotate;
	private Axis translate;
	private double scale;
	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="transform_seq")
	@Column(name="id")
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	@ManyToOne(cascade={CascadeType.ALL})
	@JoinColumn(name="rotation_id")
	public Rotation getRotate() {
		return rotate;
	}
	public void setRotate(Rotation rotate) {
		this.rotate = rotate;
	}
	@ManyToOne(cascade={CascadeType.ALL})
	@JoinColumn(name="axis_id")
	public Axis getTranslate() {
		return translate;
	}
	public void setTranslate(Axis translate) {
		this.translate = translate;
	}
	@Column(name="escala")
	public double getScale() {
		return scale;
	}
	public void setScale(double scale) {
		this.scale = scale;
	}
	
}
